//
// Created by Administrator on 2021/10/20.
//

#ifndef PARTJOB_C___NODE_H
#define PARTJOB_C___NODE_H
// doublyList's class node
class Node
{
public:
    Node() : value(0), prev(nullptr), next(nullptr) {}
    Node(int data, Node* prev, Node* next) : value(data), prev(prev), next(next) {}
    void setData(int data) { value = data; }
    int getData() const { return value; }
    void setPrev(Node *newPrev) { prev = newPrev; }
    Node* getPrev() const { return prev; }
    void setNext(Node *newNext) { next = newNext; }
    Node* getNext() const { return next; }
private:
    int value;
    Node* prev;
    Node* next;
};

// anyList's class node
//class Node {
//public:
//    Node() : data(0), next(nullptr) {}
//
//    Node(int theData, Node *newNext) : data(theData), next(newNext) {}
//
//    Node *getNext() const { return next; }
//
//    int getData() const { return data; }
//
//    void setData(int theData) { data = theData; }
//
//    void setNext(Node *newNext) { next = newNext; }
//
//    ~Node() {}
//
//private:
//    int data;
//    Node *next; //pointer that points to next node
//};
#endif //PARTJOB_C___NODE_H
